package pATT.DataSetsGenerator.dataSetsGenerator.attribute.implement;



public class IntegerAttribute extends Attribute {
	
	private int limitDown = 0;
	private int limitUp = 0;
	private boolean weight = false;
	private int weightPercent;
	private String weightValue;
	
	public IntegerAttribute(boolean null1, String name, String type, int down, int up) {
		super(null1, name, type);
		limitDown = down;
		limitUp = up;
		recoveryValues();
	}
	
	@SuppressWarnings("unchecked")
	private void recoveryValues() {
		for (int i=limitDown;i<=limitUp;i++){
			values.add(String.valueOf(i));
		}		
	}
	
	public void setNewLimits(int limitDown,int limitUp){
		this.limitDown = limitDown;
		this.limitUp = limitUp;
		values.removeAllElements();
		recoveryValues();
		
	}
	
	
	public double getLimitDown() {
		return limitDown;
	}
	
	public void setLimitDown(int limitDown) {
		this.limitDown = limitDown;
	}
	
	public double getLimitUp() {
		return limitUp;
	}
	
	public void setLimitUp(int limitUp) {
		this.limitUp = limitUp;
	}
	
	public boolean isWeight() {
		return weight;
	}
	
	public double getWeightPercent() {
		return weightPercent;
	}
	
	public String getWeightValue() {
		return weightValue;
	}
	
	public void setWeight(boolean weight) {
		this.weight = weight;
	}
	
	public void setWeightPercent(int weightPercent) {
		this.weightPercent = weightPercent;
	}
	
	public void setWeightValue(String weightValue) {
		this.weightValue = weightValue;
	}
	

}
